package com.zhentao.controller;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.common.pojo.users.MassageParam;
import com.zhentao.service.IUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin(origins = "http://localhost:8080")
@RestController
// @RequestMapping("/users")为该控制器类中的所有方法配置了一个基础的请求路径前缀，即 "/users"
@RequestMapping("/message/send")
public class MseeageController {
    @Autowired
    public IUsersService iUsersService;

    @PostMapping("/code")
    public ResponseResult messageCode(@RequestBody MassageParam param){
       return iUsersService.messageCode(param);
    }
}
